load("//main:compile_rule.bzl","compile")
load("//main:link_rule.bzl","link")
load("//main:zip_archive_rule.bzl","zip_archive")

compile (
    name = "compile",
    srcs = ['func.cpp', 'main.cpp'],
    hdrs = ['func.h'],
)

link (
    name      = "link",
    libs      = [":compile"],   # src_compile Target对应的输出
    exec_file = "yangxian",     # 这个名字不能与main这个文件夹的名字重复
) 

zip_archive (
    name         = "zip",
    files        = [':link', 'README.md'],
    archive_file = "ctacc.zip",
)